﻿<div [@routerTransition]>
    <div class="row margin-bottom-5">
        <div class="col-xs-12">
            <div class="page-head">
                <div class="page-title">
                    <h1>
                        <span>{{l("Maintenance")}}</span>
                    </h1>
                </div>
            </div>
        </div>
    </div>
    <div class="portlet light margin-bottom-0">
        <div class="portlet-body">
            <tabset class="tab-container tabbable-line">

                <tab heading="{{l('Caches')}}">
                    <div class="row margin-bottom-10">
                        <div class="col-xs-6">
                            <p>{{l("CachesHeaderInfo")}}</p>
                        </div>
                        <div class="col-xs-6 text-right">
                            <button class="btn blue" (click)="clearAllCaches()"><i class="fa fa-refresh"></i> {{l("ClearAll")}}</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <table class="table table-striped table-hover table-bordered">
                                <tbody>
                                    <tr *ngFor="let cache of caches">
                                        <td>
                                            <span>{{cache.name}}</span>
                                            <button class="btn btn-xs blue pull-right" (click)="clearCache(cache.name);">
                                                {{l("Clear")}}
                                            </button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </tab>

                <tab heading="{{l('WebSiteLogs')}}">
                    <div class="row margin-bottom-10">
                        <div class="col-xs-6">
                            <p>{{l("WebSiteLogsHeaderInfo")}}</p>
                        </div>
                        <div class="col-xs-6 text-right">
                            <button class="btn blue" (click)="downloadWebLogs()"><i class="fa fa-download"></i> {{l("DownloadAll")}}</button>
                            <button class="btn blue" (click)="getWebLogs()"><i class="fa fa-refresh"></i> {{l("Refresh")}}</button>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="web-log-view full-height">
                                <span class="log-line" *ngFor="let log of logs">
                                    <span [class]="getLogClass(log)">{{getLogType(log)}}</span>
                                    {{getRawLogContent(log)}}
                                </span>
                            </div>
                        </div>
                    </div>
                </tab>

            </tabset>
        </div>
    </div>
</div>
